/**
 * fulihui.com Inc.
 * Copyright (c) 2015-2016 All Rights Reserved.
 */
package com.fulihui.information.api;

import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TMultiResult;
import org.near.servicesupport.result.TPageResult;

import com.fulihui.information.dto.CommentsDTO;
import com.fulihui.information.request.CommentsFabulousRequest;
import com.fulihui.information.request.CommentsIdsRequest;
import com.fulihui.information.request.CommentsRequest;

/**
 * 评论服务
 * @author yunfeng.li
 * @version $Id: v 0.1 2017年01月10日 10:33 yunfeng.li Exp $
 */
public interface CommentsService {

    /**
     * 发表/回复评论
     * @param request {@link CommentsRequest}
     * @return {@link BaseResult} 执行结果
     */
    BaseResult deliverComment(CommentsRequest request);

    TPageResult<CommentsDTO> queryPageByNewsId(CommentsRequest request);

    TMultiResult<CommentsDTO> queryPageByDiscussId(CommentsRequest request);

    TPageResult<CommentsDTO> queryPageMeComments(CommentsRequest request);

    TPageResult<CommentsDTO> queryPageToMeComments(CommentsRequest request);

    /**
     *根据评论id删除评论 / 物理删除
     *
     * @param request 评论id 不能为空
     * @return  {@link BaseResult} 执行结果
     */
    BaseResult deleteById(CommentsRequest request);

    /**
     * 批量删除评论
     * @param request 评论id[ids]集合不能为空
     * @return {@link BaseResult} 执行结果
     */
    BaseResult batchDeleteByIds(CommentsIdsRequest request);

    /**
     * 用户对评论点赞
     * @param request 评论id  不能为空
     * @return {@link BaseResult} 执行结果
     */
    BaseResult onFabulous(CommentsFabulousRequest request);
}
